//2009/08/29 01:46:02
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class Stick
{
public:
    int pieces(int x)
    {
		int len = 64;
		int ret = 0;
		while(x > 0 && len != 0)
		{
			if(x >= len) 
			{
				x -= len;
				ret ++;
			}
			len /= 2;
		}
		return ret;
    }
};
